home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / lib / ditroff / RCS / tmac.an,v < prev    next >
Encoding:
Text File  |  1988-12-29  |  9.7 KB  |  618 lines

  1. head     1.7;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ; strict;
  6. comment  @@;
  7.  
  8.  
  9. 1.7
  10. date     88.12.29.12.06.02;  author ouster;  state Exp;
  11. branches ;
  12. next     1.6;
  13.  
  14. 1.6
  15. date     88.12.29.10.12.21;  author ouster;  state Exp;
  16. branches ;
  17. next     1.5;
  18.  
  19. 1.5
  20. date     88.12.29.09.37.20;  author ouster;  state Exp;
  21. branches ;
  22. next     1.4;
  23.  
  24. 1.4
  25. date     88.12.29.09.29.17;  author ouster;  state Exp;
  26. branches ;
  27. next     1.3;
  28.  
  29. 1.3
  30. date     88.12.29.09.28.58;  author ouster;  state Exp;
  31. branches ;
  32. next     1.2;
  33.  
  34. 1.2
  35. date     88.12.19.14.23.59;  author ouster;  state Exp;
  36. branches ;
  37. next     1.1;
  38.  
  39. 1.1
  40. date     88.12.19.14.08.12;  author ouster;  state Exp;
  41. branches ;
  42. next     ;
  43.  
  44.  
  45. desc
  46. @@
  47.  
  48.  
  49. 1.7
  50. log
  51. @For Nroff, shorten "Sprite version 1.0" so it doesn't overflow space.
  52. @
  53. text
  54. @.\" Copyright (c) 1980 Regents of the University of California.
  55. .\" All rights reserved.  The Berkeley software License Agreement
  56. .\" specifies the terms and conditions for redistribution.
  57. .\"
  58. .\"    @@(#)tmac.an.new    6.3 (Berkeley) 2/2/86
  59. .\"
  60. '    DT, PD, SM, and B macros invoked internally.
  61. '    # month name
  62. .if "\nd"0" .nr m \n(mo-1
  63. .if "\nm"0" .ds ]m January
  64. .if "\nm"1" .ds ]m February
  65. .if "\nm"2" .ds ]m March
  66. .if "\nm"3" .ds ]m April
  67. .if "\nm"4" .ds ]m May
  68. .if "\nm"5" .ds ]m June
  69. .if "\nm"6" .ds ]m July
  70. .if "\nm"7" .ds ]m August
  71. .if "\nm"8" .ds ]m September
  72. .if "\nm"9" .ds ]m October
  73. .if "\nm"10" .ds ]m November
  74. .if "\nm"11" .ds ]m December
  75. '    # set the date
  76. .if n \{.nr m \nm+1
  77. .     ie \nd .ds ]W Modified \nm/\nd/\ny
  78. .     el .ds ]W Printed \n(mo/\n(dy/\n(yr\}
  79. .if t \{.ie \nd .ds ]W \*(]m \nd, 19\ny
  80. .     el .ds ]W \*(]m \n(dy, 19\n(yr\}
  81. .if t .ds ]W Sprite version 1.0
  82. .if n .ds ]W Sprite v1.0
  83. .if t .tr *\(**
  84. .ie n \{\
  85. .    ds lq \&"\"
  86. .    ds rq \&"\"
  87. .\}
  88. .el \{\
  89. .    ds rq ''
  90. .    ds lq ``
  91. .\}
  92. '    # reset the basic page layout
  93. .de }E
  94. .}f
  95. .in \\n()Ru+\\n(INu
  96. .ll \\n(LLu
  97. ..
  98. '    # default tabs
  99. .de DT
  100. 'ta .5i 1i 1.5i 2i 2.5i 3i 3.5i 4i 4.5i 5i 5.5i 6i 6.5i
  101. ..
  102. '    # set type font and size
  103. .de }f
  104. .ps 10
  105. .ft 1
  106. ..
  107. '    # handle the head of the page
  108. .de }H
  109. .ev 1
  110. .}C
  111. .ie "\*(.T"va" 'sp .1i
  112. .el 'sp .5i
  113. .ft 1
  114. .ps 10
  115. .tl @@\\*(]H@@\\*(]D@@\\*(]H@@
  116. 'sp .5i
  117. .ev
  118. .ns
  119. ..
  120. '    # handle the foot of the page
  121. .de }F
  122. .ev 1
  123. .ft 1
  124. .ps 10
  125. 'sp .5i
  126. .tl @@\\*(]W@@\\*(]L@@%@@
  127. 'bp
  128. .ev
  129. ..
  130. '    # the cut mark
  131. .if !"\*(.T"vp" .ig
  132. .de }C
  133. .po 0i
  134. .lt 7.45i
  135. .tl '__''__'
  136. .po
  137. .lt
  138. ..
  139. '    # the final cut mark
  140. .de }M
  141. .}N
  142. .wh -1p }C
  143. .ll \\n(LLu
  144. ..
  145. '    # no runout unless there was a .TH
  146. .de }K
  147. .}N
  148. .pl 1
  149. .ll \\n(LLu
  150. ..
  151. .em }K
  152. '    # set title and heading
  153. .de TH
  154. .PD
  155. .if n .nr IN .5i
  156. .if t .nr IN .5i
  157. .nr LL \\n(.l
  158. .ds ]H \\$1
  159. .ds ]D UNKNOWN MANUAL SECTION
  160. .if '\\$2'1' .ds ]D User Commands
  161. .if '\\$2'1C' .ds ]D User Commands
  162. .if '\\$2'1L' .ds ]D User Commands
  163. .if '\\$2'6' .ds ]D Games and Demos
  164. .if '\\$2'7' .ds ]D Tables
  165. .if '\\$2'2' .ds ]D C Library Procedures
  166. .if '\\$2'3' .ds ]D C Library Procedures
  167. .if '\\$2'3C' .ds ]D C Library Procedures
  168. .if '\\$2'3F' .ds ]D Fortran Library Procedures
  169. .if '\\$2'3S' .ds ]D C Library Procedures
  170. .if '\\$2'3M' .ds ]D Mathematical Library Procedures
  171. .if '\\$2'3N' .ds ]D C Library Procedures
  172. .if '\\$2'3R' .ds ]D RPC Services
  173. .if '\\$2'3X' .ds ]D C Library Procedures
  174. .if '\\$2'5' .ds ]D File Formats
  175. .if '\\$2'4' .ds ]D Devices
  176. .if '\\$2'8' .ds ]D User Commands
  177. .ds ]L\"
  178. .if !"\\$3"" .ds ]L \\$3
  179. .if !"\\$4"" .ds ]W \\$4
  180. .wh 0 }H
  181. .if t .if !"\*(.T"va" .wh -1i }F
  182. .if t .if "\*(.T"va" .wh -1.4i }F
  183. .if n .wh -1.167i }F
  184. .em }M
  185. .if \\n(nl .bp 1
  186. .}E
  187. .DT
  188. .nr )I .5i
  189. .nr )R 0
  190. .if n .na
  191. ..
  192. '    # section heading
  193. .de SH
  194. .ss 12
  195. .if "\\$1"SYNOPSIS" .ss 18
  196. .}X 0
  197. .nr )E 2
  198. .SM
  199. \&\\$1 \|\\$2 \|\\$3 \|\\$4 \|\\$5 \|\\$6
  200. ..
  201. '    # sub section heading
  202. .de SS
  203. .ne 4
  204. .}X \\n()Ru+\\n(INu ""
  205. \&\\$1 \|\\$2 \|\\$3 \|\\$4 \|\\$5 \|\\$6
  206. .br
  207. ..
  208. '    # subroutine for section heading
  209. .de }X
  210. .}E
  211. .ti \\$1
  212. .sp \\n()Pu
  213. .ne 2
  214. .nr )R 0
  215. .fi
  216. .it 1 }N
  217. .B
  218. ..
  219. '    # end of SH (cf }X above and }N below)
  220. .de }2
  221. .nr )E 0
  222. .}E
  223. .nr )I .5i
  224. .ns
  225. ..
  226. '    # italic
  227. .de I
  228. .ft 2
  229. .it 1 }N
  230. .if !"\\$1"" \&\\$1 \\$2 \\$3 \\$4 \\$5 \\$6
  231. ..
  232. '    # bold
  233. .de B
  234. .ft 3
  235. .it 1 }N
  236. .if !"\\$1"" \&\\$1 \\$2 \\$3 \\$4 \\$5 \\$6
  237. ..
  238. '    # small
  239. .de SM
  240. .ps 9
  241. .it 1 }N
  242. .if !"\\$1"" \&\\$1 \\$2 \\$3 \\$4 \\$5 \\$6
  243. ..
  244. '    # combinations of Roman, italic, bold
  245. .de RI
  246. .}S 1 2 \& "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6"
  247. ..
  248. .de RB
  249. .}S 1 3 \& "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6"
  250. ..
  251. .de IR
  252. .}S 2 1 \& "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6"
  253. ..
  254. .de IB
  255. .}S 2 3 \& "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6"
  256. ..
  257. .de BR
  258. .}S 3 1 \& "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6"
  259. ..
  260. .de BI
  261. .}S 3 2 \& "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6"
  262. ..
  263. '    # make special case of shift out of italic
  264. .de }S
  265. .ds ]F
  266. .if "\\$1"2" .if !"\\$5"" .ds ]F\^
  267. .ie !"\\$4"" .}S \\$2 \\$1 "\\$3\f\\$1\\$4\\*(]F" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9"
  268. .el \\$3
  269. .}f
  270. ..
  271. '    # paragraph
  272. .de LP
  273. .PP
  274. ..
  275. .de PP
  276. .sp \\n()Pu
  277. .ne 1.1v
  278. .}E
  279. .nr )I .5i
  280. .ns
  281. ..
  282. '    # synonym for .PP
  283. .de P
  284. .PP
  285. ..
  286. '    # paragraph distance
  287. .de PD
  288. .if t .nr )P .4v
  289. .if n .nr )P 1v
  290. .if !"\\$1"" .nr )P \\$1v
  291. ..
  292. '    # paragraph with hanging indent
  293. .de HP
  294. .sp \\n()Pu
  295. .ne 1.1v
  296. .if !"\\$1"" .nr )I \\$1n
  297. .ll \\n(LLu
  298. .in \\n()Ru+\\n(INu+\\n()Iu
  299. .ti \\n()Ru+\\n(INu
  300. .}f
  301. ..
  302. '    # indented paragraph
  303. .de IP
  304. .TP \\$2
  305. \&\\$1
  306. ..
  307. '    # tagged paragraph (paragraph with hanging label)
  308. .de TP
  309. .if !"\\$1"" .nr )I \\$1n
  310. .sp \\n()Pu
  311. .ne 1.1v
  312. .in \\n()Ru
  313. .nr )E 1
  314. .ns
  315. .it 1 }N
  316. .di ]B
  317. ..
  318. '    # end of TP (cf }N below)
  319. .de }1
  320. .ds ]X \&\\*(]B\\
  321. .nr )E 0
  322. .if !"\\$1"" .nr )I \\$1n
  323. .}f
  324. .ll \\n(LLu
  325. .in \\n()Ru+\\n(INu+\\n()Iu
  326. .ti \\n(INu
  327. .ie !\\n()Iu+\\n()Ru-\w@@\\*(]X@@u-3p \{\\*(]X
  328. .br\}
  329. .el \\*(]X\h@@|\\n()Iu+\\n()Ru@@\c
  330. .}f
  331. ..
  332. '    # handle end of 1-line features
  333. .de }N
  334. .if \\n()E .br
  335. .di
  336. .if "\\n()E"0" .}f
  337. .if "\\n()E"1" .}1
  338. .if "\\n()E"2" .}2
  339. .nr )E 0
  340. ..
  341. '    # increase relative indent
  342. .de RS
  343. .nr ]\\n+()p \\n()I
  344. .nr )\\n()p \\n()R
  345. .ie !"\\$1"" .nr )R +\\$1n
  346. .el .nr )R +\\n()I
  347. .nr )I .5i
  348. .}E
  349. ..
  350. .de DS
  351. .RS
  352. .nf
  353. .sp
  354. ..
  355. '    # decrease relative indent
  356. .de RE
  357. .if !"\\$1"" \{.ie "\\$1"0" .nr )p 1 1
  358. .        el .nr )p \\$1 1\}
  359. .ds ]i \\*(]I\\n()p
  360. .ds ]r \\*(]R\\n()p
  361. .nr )I \\*(]i
  362. .nr )R \\*(]r
  363. .if \\n()p .nr )p -1
  364. .}E
  365. ..
  366. .de DE
  367. .fi
  368. .RE
  369. .sp.5
  370. ..
  371. .nr )p 0 1
  372. .ds ]I \\\\n(]
  373. .ds ]R \\\\n()
  374. .bd S B 3
  375. .if t .ds R \(rg
  376. .if n .ds R (Reg.)
  377. .ds S \s10
  378. .hy 14
  379. .if "\*(.T"va" .po -0.4i
  380. ./"
  381. ./" Sprite addition:  define ]l string variable to hold directory
  382. ./" containing macro library, for ease in including tmac.sprite.
  383. .ds ]l /sprite/lib/ditroff/
  384. @
  385.  
  386.  
  387. 1.6
  388. log
  389. @Forget the last two deltas.  They produced other undesirable
  390. side-effects.  I gradually migrated diffs from tmac.an.new to
  391. this file until I found a bug in .TH where it was setting too
  392. many footer traps.  Fixed the bug, and left in the other changes
  393. moved from tmac.an.new (mostly just syntactic changes, not
  394. semantic).
  395. @
  396. text
  397. @d29 1
  398. @
  399.  
  400.  
  401. 1.5
  402. log
  403. @Oops;  got wrong version of file in last delta.  This is the
  404. Sprite-ified Monet version.
  405. @
  406. text
  407. @a37 20
  408. .de AT
  409. .if t \{\
  410. .    ds ]W 7th Edition
  411. .    if "\\$1"3" .ds ]W 7th Edition
  412. .    if "\\$1"4" .ds ]W System III
  413. .    if "\\$1"5" \{\
  414. .        ie "\\$2""  .ds ]W System V
  415. .        el .ds ]W System V Release \\$2
  416. .    \}
  417. .\}
  418. ..
  419. .de UC
  420. .if t \{\
  421. .    ds ]W 3rd Berkeley Distribution
  422. .    if "\\$1"3" .ds ]W 3rd Berkeley Distribution
  423. .    if "\\$1"4" .ds ]W 4th Berkeley Distribution
  424. .    if "\\$1"5" .ds ]W 4.2 Berkeley Distribution
  425. .    if "\\$1"6" .ds ]W 4.3 Berkeley Distribution
  426. .\}
  427. ..
  428. d77 1
  429. a77 3
  430. \" .if n .ig
  431. \" .if \nv>0 .ig
  432. .ig
  433. a100 1
  434. .DT
  435. d103 2
  436. a104 1
  437. .nr LL \\n(.l.ds ]H \\$1
  438. d127 2
  439. a128 2
  440. .if t .ie !"\*(.T"va" .wh -1i }F
  441. .if t .el .wh -1.4i }F
  442. d149 2
  443. a150 1
  444. .}X \\n()Ru+\\n(INu
  445. d223 1
  446. a223 1
  447. .ne 2
  448. d241 1
  449. a241 1
  450. .ne 2
  451. d315 1
  452. a315 1
  453. .sp .5
  454. @
  455.  
  456.  
  457. 1.4
  458. log
  459. @Was having problems with infinite recursion in footer macro.
  460. So, imported tmac.an.new from Monet (this file), and added
  461. Sprite upgrades.  Problem seems to have gone away (but I
  462. don't know why).
  463. @
  464. text
  465. @d28 1
  466. d97 3
  467. a99 2
  468. .if n .ig
  469. .if \nv>0 .ig
  470. d126 22
  471. a147 4
  472. .nr LL \\n(.l
  473. .ds ]H \\$1\|(\|\\$2\|)
  474. .ie "\\$5"" .ds ]D UNIX Programmer's Manual
  475. .el .ds ]D \\$5
  476. a153 1
  477. .ds ]L \\$3
  478. a158 6
  479. .mk ka
  480. .if !'\\n(ka'-1' .bp
  481. .if t \{\
  482. .    ie "\\$4""  .ds ]W 7th Edition
  483. .    el .ds ]W \\$4
  484. .\}
  485. d163 1
  486. a163 1
  487. .if "\\$2"SYNOPSIS" .ss 18
  488. a214 6
  489. .de VS
  490. 'if '\\$1'4' .mc \s12\(br\s0
  491. ..
  492. .de VE
  493. 'mc
  494. ..
  495. d347 4
  496. @
  497.  
  498.  
  499. 1.3
  500. log
  501. @Augment section names.
  502. @
  503. text
  504. @d1 6
  505. d28 29
  506. a56 1
  507. .if t .ds ]W Sprite version 1.0
  508. d76 2
  509. a77 2
  510. .if !"\*(.T"va" 'sp .4i
  511. 'sp .1i
  512. d96 2
  513. a97 1
  514. .if !"\*(.T"vp" .ig
  515. d111 1
  516. a111 1
  517. '    # no run-out unless there was a .TH
  518. d121 1
  519. d125 3
  520. a127 22
  521. .ds ]H \\$1
  522. .ds ]D UNKNOWN SECTION OF THE MANUAL
  523. .if '\\$2'1' .ds ]D User Commands
  524. .if '\\$2'1C' .ds ]D User Commands
  525. .if '\\$2'1L' .ds ]D User Commands
  526. .if '\\$2'6' .ds ]D Games and Demos
  527. .if '\\$2'7' .ds ]D Tables
  528. .if '\\$2'2' .ds ]D C Library Procedures
  529. .if '\\$2'3' .ds ]D C Library Procedures
  530. .if '\\$2'3C' .ds ]D C Library Procedures
  531. .if '\\$2'3F' .ds ]D Fortran Library Procedures
  532. .if '\\$2'3S' .ds ]D C Library Procedures
  533. .if '\\$2'3M' .ds ]D Mathematical Library Procedures
  534. .if '\\$2'3N' .ds ]D C Library Procedures
  535. .if '\\$2'3R' .ds ]D RPC Services
  536. .if '\\$2'3X' .ds ]D C Library Procedures
  537. .if '\\$2'5' .ds ]D File Formats
  538. .if '\\$2'4' .ds ]D Devices
  539. .if '\\$2'8' .ds ]D User Commands
  540. .ds ]L\"
  541. .if !"\\$3"" .ds ]L \\$3
  542. .if !"\\$4"" .ds ]W \\$4
  543. d129 2
  544. a130 2
  545. .if !"\*(.T"va" .wh -1i }F
  546. .if "\*(.T"va" .wh -1.4i }F
  547. d134 1
  548. d140 6
  549. d149 3
  550. a151 1
  551. .}X 0 "\\$1" smaller
  552. d153 1
  553. d158 1
  554. a158 2
  555. .ne 4
  556. .}X \\n()Ru+\\n(INu ""
  557. d167 1
  558. a167 1
  559. .ne 1.1v
  560. a169 2
  561. .ss 12
  562. .if "\\$2"SYNOPSIS" .ss 18
  563. a170 1
  564. .if !"\\$3"" .SM
  565. d202 6
  566. d232 3
  567. d237 1
  568. a237 1
  569. .ne 1.1v
  570. d255 1
  571. a255 1
  572. .ne 1.1v
  573. d262 5
  574. d329 1
  575. a329 1
  576. .sp.5
  577. a330 9
  578. '    # obsolete synonym for PP (not advertised)
  579. .de LP
  580. .PP
  581. ..
  582. '    # indented paragraph
  583. .de IP
  584. .TP \\$2
  585. \&\\$1
  586. ..
  587. a339 4
  588. ./"
  589. ./" Sprite addition:  define ]l string variable to hold directory
  590. ./" containing macro library, for ease in including tmac.spman.
  591. .ds ]l /sprite/lib/ditroff/
  592. @
  593.  
  594.  
  595. 1.2
  596. log
  597. @Define ]l string for use in Sprite man pages.
  598. @
  599. text
  600. @d22 1
  601. a22 1
  602. .if t .ds ]W 4th Berkeley distribution
  603. d89 19
  604. a107 2
  605. .ds ]H \\$1\|(\|\\$2\|)
  606. .ds ]D UNIX Programmer's Manual
  607. d110 1
  608. @
  609.  
  610.  
  611. 1.1
  612. log
  613. @Initial revision
  614. @
  615. text
  616. @d294 4
  617. @
  618.